import {defineStore} from "pinia";
import {ref} from "vue";

export const useOrderInfoStore = defineStore("orderInfo", () => {
    const isRefresh = ref()
    const setIsRefresh = (isRefreshVal) => {
      isRefresh.value = isRefreshVal
    }
    return {
      isRefresh,
      setIsRefresh
    }
  },
  {
    // 配置持久化
    persist: {
      // 调整为兼容多端的API
      storage: {
        setItem(key, value) {
          uni.setStorageSync(key, value)
        },
        getItem(key) {
          return uni.getStorageSync(key)
        },
      },
    },
  },
)
